package com.example.collectionlinkmanagementsystem.service;

import com.example.collectionlinkmanagementsystem.entity.LinkBean;
import com.example.collectionlinkmanagementsystem.mapper.LinkMapper;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/5/13 1:06
 */
@Service
public class LinkService {
    @Resource
    LinkMapper linkMapper;

    //    获取所有链接实体类
    public List<LinkBean> getAll(LinkBean linkBean){
        return linkMapper.getAll(linkBean);
    }
    //    获取链接条数
   public Integer count(LinkBean linkBean){
        return linkMapper.count(linkBean);
    }
    //    删除一条链接数据
    public Integer removeLink(LinkBean linkBean){
        return linkMapper.removeLink(linkBean);
    }

    //    更新链接数据
    public Integer updateLink(LinkBean linkBean){
        return linkMapper.updateLink(linkBean);
    }
    //    增加连接数据
    public Integer addLink(LinkBean linkBean){
        return linkMapper.addLink(linkBean);
    }
}
